package polymorphism.music;
import static net.mindview.util.Print.*;

import polymorphism.music.Instrument;

class Stringed extends Instrument {
	public void play(Node n) {
		print("Stringed.play() " + n);
	}
}
class Brass extends Instrument {
	public void play(Node n) {
		print("Brass.play() " + n);
	}
}
public class Music2 {

	public static void tune(Wind i) {
		i.play(Node.MIDDLE_C);
	}
	public static void tune(Stringed i) {
		i.play(Node.MIDDLE_C);
	}
	public static void tune(Brass i) {
		i.play(Node.MIDDLE_C);
	}
	public static void main(String[] args) {
		Wind flute = new Wind();
		Stringed violin = new Stringed();
		Brass frenchHorn = new Brass();
		tune(flute);
		tune(violin);
		tune(frenchHorn);
	}
}
